package com.sweets.look.database;

import android.content.Context;
import android.os.Handler;
import android.os.Message;

import com.sweets.look.ui.activity.BrowserActivity;

public class ClickHandler extends Handler {
    private BrowserActivity mBrowserController;

    public ClickHandler(Context context) {
        super();
        try {
            this.mBrowserController = ((BrowserActivity) context);
        } catch (ClassCastException e) {
            throw new ClassCastException(context + " must implement BrowserController");
        }
    }

    @Override
    public void handleMessage(Message msg) {
        super.handleMessage(msg);
        this.mBrowserController.longClickPage(msg.getData().getString("url"));
    }
}

